package cn.iocoder.yudao.module.mqtt.controller.admin.subscribewater.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - MQTT水监控新增/修改 Request VO")
@Data
public class SubscribeWaterSaveReqVO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28356")
    private Long id;

    @Schema(description = "设备KEY", example = "9746")
    private String deviceKey;

    @Schema(description = "MQTT配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23179")
    @NotNull(message = "MQTT配置ID不能为空")
    private Long mqttConfigId;

    @Schema(description = "主题", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "主题不能为空")
    private String topic;

    @Schema(description = "温度")
    private String payloadWd;

    @Schema(description = "浊度")
    private String payloadZd;

    @Schema(description = "余氯")
    private String payloadYl;

    @Schema(description = "pH值")
    private String payloadPh;

    @Schema(description = "消息内容")
    private String payload;

    @Schema(description = "服务质量")
    private Integer qos;

    @Schema(description = "是否保留消息")
    private Boolean retained;

    @Schema(description = "消息方向：IN-接收，OUT-发送", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "消息方向：IN-接收，OUT-发送不能为空")
    private String direction;

    @Schema(description = "客户端ID", example = "18777")
    private String clientId;

    @Schema(description = "消息ID", example = "8008")
    private String messageId;

    @Schema(description = "时间戳", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "时间戳不能为空")
    private LocalDateTime timestamp;

}